package object;

public class Rooster {

    private String name;
    private int age;

    public Rooster(String name ,int age){
        super();
        this.name = name;
        this.age = age;
    }


    public static void main(String[] args) {
        Rooster r = null;//声明一个Rooster类型的变量并将其赋值为null

        r = new Rooster("昴日星官" ,12500);

        System.out.println(r.hashCode());//第1次

        r.name = "昴日星官他哥";
        System.out.println(r.hashCode());//第2 次

        r.age = 13500;
        System.out.println(r.hashCode());//第3次

        r.name = "昴日星官他爹";
        r.age = 18000;
        System.out.println(r.hashCode());//第4次
    }

}
